1. Field of the Invention
The present invention relates in general to the updating of motion vector memories used for prediction of motion vectors in a video compression coding/decoding method and system, and more particularly to a method and apparatus for updating motion vector memories wherein, for a frame composed of N macroblocks in the horizontal direction, only (2N+1) motion vector memories are used to store all motion vectors necessary to motion prediction, and only three memories per macroblock are used to update motion vectors, thereby reducing the size of a circuitry, the amount of computation and the amount of power consumed.
2. Description of the Prior Art
Generally, video signal compression coding and decoding can desirably reduce the capacity of a memory necessary for storing video information as well as enable the transmission of the video information over a low-rate channel. In this regard, such compression coding and decoding techniques occupy a very important part of the multimedia industry requiring a variety of video applications such as video storage, video transmission, etc. On the other hand, the standardization of such information compression techniques has been required for the enlargement of the multimedia industry and the compatibility of information. In order to meet this requirement, video standards have been proposed up to the present on the basis of a variety of applications. For example, representative video coding/decoding standards may be H.261 of ITU-T (International Telecommunication Union—Telecommunication Standardization Sector) for transmitting video information for a video phone, video conferencing and the like via an ISDN (Integrated Service Digital Network), H.263 of ITU-T for transmitting video information via a PSTN (Public Switched Telephone Network), MPEG-1 of ISO/IEC JTC1/SC29/WG11 (International Standardization Organization/International Electrotechnical Commission Joint Technical Committee 1/Sub Committee 29/Working Group 11) MPEG (Moving Picture Experts Group) for storage of video in DSM (Digital Storage Media), and MPEG-2 for high definition digital broadcasting such as an EDTV (Enhanced Digital Television), HDTV (High Definition Television) and the like. A representative standard of still image signal compression coding techniques may be, for example, JPEG (Joint Photographic Coding Experts Group) of ISO/IEC JTC1/SC29/WG1.
FIG. 1 is a block diagram schematically showing the construction of a conventional digital video compression coding system. For efficient video compression coding, the method generally used for estimating a motion vector by referencing a reference frame for the coding of a current frame, performing a motion compensation prediction operation using the estimated motion vector and coding the resulting prediction error. With reference to FIG. 1, the conventional video compression coding system comprises a transform unit 11 for performing a transform operation for a frame difference between an input current frame and a motion compensation prediction frame obtained by a motion compensation predictor 61, a quantizer 31 for quantizing transform coefficients from the transform unit 11 for data compression, a variable length coder 41 for performing a variable length coding (VLC) operation for the transform coefficients quantized by the quantizer 31, a dequantizer 51 and an inverse transform unit 21. In this coding system, the frame difference is reconstructed by the dequantizer 51 and inverse transform unit 21 and applied to the motion compensation predictor 61 so that it can be used to obtain a prediction frame related to the next frame. The motion compensation predictor 61 performs a motion vector estimation operation using the input current frame and the reference frame and finds the prediction frame using an estimated motion vector. The motion vector estimated by the motion compensation predictor 61 is transferred to the variable length coder 41, which then variable length codes and transmits it together with the transform coefficients quantized by the quantizer 31. An image information bit stream output from the variable length coder 41 is transmitted to a receiver or a multiplexer for its multiplexing with other signals.
FIG. 2 is a block diagram schematically showing the construction of a conventional digital video compression decoding system. As shown in this drawing, a variable length decoder 42 performs a variable length decoding (VLD) operation for the transform coefficients and motion vector bit stream transmitted from the video compression coding system. The transform coefficients variable length decoded by the variable length decoder 42 are reconstructed by a dequantizer 22 and inverse transform unit 52 and applied to a motion compensation predictor 62. Also, the motion vector information variable length decoded by the variable length decoder 42 is applied directly to the motion compensation predictor 62 for use in motion compensation prediction. In other words, the digital video compression decoding system is adapted to receive information transmitted from the coding system and reconstruct the original frame on the basis of the received information. In order to reconstruct the same frame as that in the coding system, the decoding system must decode a received motion vector and perform a motion compensation prediction for the decoded motion vector.
In a general video coding method and system, motion prediction and compensation operations are not performed on a frame basis, but in the unit of a predetermined number of picture elements or pixels (M pixels in the horizontal direction and N pixels in the vertical direction, typically indicated by M×N pixels). This group of pixels is typically called a macroblock. It is generally prescribed that the macroblock be sized with 16 pixels in the horizontal direction and 16 pixels in the vertical direction (referred to hereinafter as “16×16”). In the present invention, although the size of the macroblock is not limited to a specific value, it will be described as 16×16 as an example for the convenience of description. A motion vector is two-dimensional information indicative of the quantity of motion of an object in the previous and current frames on an X-Y coordinate plane. Namely, the motion vector consists of a transversal motion value and a longitudinal motion value.
On the other hand, the motion prediction and compensation operations are performed on a macroblock basis. Namely, pixels in one macroblock are compensation-predicted using the same motion vector. In this regard, one motion vector is transmitted for the compensation prediction of each macroblock. However, there has recently been a need for video coding transmission at a very low bit-rate, resulting in studies of methods for effectively coding videos of low resolution. Representative methods are to estimate a motion vector on a smaller pixel group basis instead of the assumption that pixels in one macroblock have the same motion. For the latest very low bit-rate video coding standard, or H.263 of ITU-T, one macroblock is partitioned into four blocks of the same size, and the motion estimation and prediction operations are performed for each of the partitioned blocks together with the existing method for compensating for each macroblock on the basis of one motion vector. In the present invention, a macroblock mode where one motion vector per macroblock is transmitted will be referred to hereinafter as a 16×16 mode, and a macroblock mode where four motion vectors per macroblock are transmitted will be referred to hereinafter as an 8×8 mode.
As stated previously, a motion vector obtained by the motion compensation predictor is variable length coded by the variable length coder. The variable length coder represents a value with a higher generation frequency as a shorter code and a value with a lower generation frequency as a longer code, respectively. A motion vector has a close correlation with the surrounding blocks or macroblocks because of image characteristics. Accordingly, the coding efficiency can be increased by variable length coding a difference vector between a current motion vector and a motion vector predicted using motion vectors of the surrounding blocks or macroblocks, rather than directly variable length coding the current motion vector. The reason is that the difference vector is 0 or a value approximating 0 at a significantly high frequency.
FIG. 3 is a view showing the position of a macroblock to be currently coded and the positions of the surrounding macroblocks used for the prediction of a motion vector of the macroblock to be currently coded. Generally, a predicted motion vector can be determined using adjacent motion vectors in the following manner. That is, the predicted motion vector is determined as the median value of motion vectors of three macroblocks, or the left macroblock MB_A, the upper macroblock MB_B and the upper right macroblock MB_C, around a macroblock (MB_X) to be currently coded. A difference vector between the determined predicted motion vector and the current motion vector is obtained and then variable length coded. This method is typically used in ITU-T H.263 and ISO/IEC MPEG-4.
FIG. 3 illustrates motion vectors of the left, upper and upper right blocks or macroblocks around a macroblock to be currently coded, when the current macroblock is in the 16×16 mode. In this drawing, MVa can be interpreted to be of two types. It represents a motion vector of the left macroblock if the left macroblock is in the 16×16 mode, and a motion vector of an upper right block of the left macroblock if the left macroblock is in the 8×8 mode. Similarly, MVb represents a motion vector of the upper macroblock if the upper macroblock is in the 16×16 mode, and a motion vector of a lower left block of the upper macroblock if the upper macroblock is in the 8×8 mode. Similarly, MVc represents a motion vector of the upper right macroblock if the upper right macroblock is in the 16×16 mode, and a motion vector of a lower left block of the upper right macroblock if the upper right macroblock is in the 8×8 mode.
FIGS. 4a to 4d are views illustrating the motion vectors MVa, MVb and MVc when the current macroblock in FIG. 3 is in the 8×8 mode. FIG. 4a illustrates the motion vectors MVa, MVb and MVc when a block to be currently coded is an upper left block of the current macroblock, FIG. 4b illustrates the motion vectors MVa, MVb and MVc when the block to be currently coded is an upper right block of the current macroblock, FIG. 4c illustrates the motion vectors MVa, MVb and MVc when the block to be currently coded is a lower left block of the current macroblock, and FIG. 4d illustrates the motion vectors MVa, MVb and MVc when the block to be currently coded is a lower right block of the current macroblock. The point of difference of the 8×8 macroblock mode from the 16×16 macroblock mode in FIG. 3 is that the motion vectors MVa, MVb and MVc are defined differently according to the position of the block (not a macroblock) to be currently coded and even the motion vector of the macroblock to be currently coded is used. Similarly to FIG. 3, in the case where the block to be currently coded is an upper left block of the current macroblock, the motion vector MVa represents a motion vector of the left macroblock if the left macroblock is in the 16×16 mode, and a motion vector of an upper right block of the left macroblock if the left macroblock is in the 8×8 mode.
The main object of the motion vector prediction is to efficiently code a current motion vector using a similarity among motion vectors of adjacent macroblocks or blocks. However, additional memories must be provided to reference motion vectors of the surrounding macroblocks or blocks. Further, complex processes are required to update and reference the memories. As a result, provided that the motion estimator and motion compensator are implemented into hardware modules or ASICs (Application Specific Integrated Circuits) using the memories, the complexity and power consumption will be increased. Furthermore, in conventional techniques, for the updating of motion vector memories, motion vectors of all macroblocks of one frame are individually stored or all motion vectors of one slice (corresponding to a row of one macroblock) are stored at a time, thereby increasing the amount of computation in terms of software and the size and complexity of a circuitry and the amount of power consumed in terms of hardware.